import Vue from "vue";
import Vuex from "vuex";
import axios  from "axios";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    professionTypes:[],
  },
  mutations: {
    setprofessionTypes(state,playload){
      state.professionTypes=playload;
    }
  },
  actions: {
    getprofessionTypes({commit},payload){
      axios({
        method: "get",
        url: "/ceto/common/professionTypes",
      }).then(
        (res) => {
          commit("setprofessionTypes",res.data)
        },
        (error) => {
          console.log(" request error : "+error.response.status);
        }
      );

    }

    

  },
  modules: {},
});
